<extend name="Common/form-edit" />
<block name="tit">
	<a href="{:U('index')}" >数据列表</a>
    <a href="{:U('add?type=1')}" <eq name="type" value="1">class="current"</eq> >添加文本数据块</a>
    <a href="{:U('add?type=2')}" <eq name="type" value="2">class="current"</eq> >添加HTML数据块</a>
</block>
<block name="form">
    <tr>
        <th colspan="2">
            添加数据
            <input type="hidden" name="type" value="{$type}">
            <input type="hidden" name="id" value="{$info.id}">
        </th>
    </tr>
	<tr>
		<td width="15%">分组:</td>
		<td width="85%">
			<select name="groups" tip="分组查询/修改配置">
				<foreach name="Think.config.DATA_GROUPS" key="k" item="v">
				<option value="{$k}" <eq name="info.groups" value="k">selected</eq> >{$v}</option>
				</foreach>
			</select>
		</td>
	</tr>
	<tr>
		<td>名称:</td>
		<td>
			<input type="text" name="title" datatype="zh" tip="请填写配置中文名称" value="{$info.title}">
		</td>
	</tr>
	<tr>
		<td>标识:</td>
		<td>
			<input type="text" name="name" datatype="require" tip="请填写配置英文标志" value="{$info.name}">
		</td>
	</tr>
	<tr>
		<td>配置值:</td>
		<td width="85%">
			<switch name="type">
			<case value="2">
				{:W('Ueditor/editor',array('value',$info['value']))}
			</case>
			<default />
				<textarea name="value" style="width:99%;height:80px;">{$info.value}</textarea>
			</switch>
		</td>
	</tr>
	<tr>
		<td>备注:</td>
		<td>
			<input type="text" name="remark" tip="配置的备注信息" value="{$info.remark}">
		</td>
	</tr>
	<tr>
		<td>排序:</td>
		<td>
			<input type="text" name="sort" tip="分组查询时的排列顺序" value="{$info.sort}">
		</td>
	</tr>
</block>